<core:SET width='200'>
<core:SET content="content">

<core:SET title="Static pages management">
<core:WRAP file="/adm/adm.layout.html" placeholder="Content">

<core:include file="/adm/inc/inc.adm.tabs.html">

<h1 align="center"> </h1>

<script type="text/javascript" src="/{$#app_name}/FCKeditor/fckeditor.js"></script>
<script language="Javascript">

      window.onload= function()
      {
      	initGMenu();
        var BasePath  = '/{$#app_name}/FCKeditor/';
        var oDescriptionEditor = new FCKeditor( 'description' ) ;
        oDescriptionEditor.BasePath = BasePath;
        oDescriptionEditor.Height = 500;
        oDescriptionEditor.ReplaceTextarea();

        var oTeaserEditor = new FCKeditor( 'teaser' ) ;
        oTeaserEditor.BasePath = BasePath;
        oTeaserEditor.ReplaceTextarea() ;
      }

</script>


<form id="PageForm" name="PageForm" method="post" action="" runat="server">
<input name="page_id" type="hidden" id="page_id" runat="server">
<input name="page" type="hidden" id="page" runat="server">
<hr>
<core:optional for="msg">
	<span class="message" runat="server"> {$msg} </span>
</core:optional>
<table width="100%" border="0" align="center" cellspacing="2" cellpadding="3">
    <tr align="left">
    	<td class="whiteheader_center">
    		<core:optional for="page_id">
    			Edit the static page (ID: {$page_id})
            </core:optional>
            <core:default for="page_id">
            	Create a new static page
            </core:default>
         </td>
         <td class="whiteheader">
            <a href="/{$#app_name}/myprofile/index.htm"> My Profile </a> &nbsp;
           	<html:link url="/">All pages </html:link>
          </td>
     </tr>

    <core:default for="supress_errors">
    <ERRORSUMMARY id='Summary' runat="server">
        <tr valign="top">
          <td width="{$width}">Errors: &nbsp;</td>
          <td class="left">
          	<FONT COLOR="RED">
          		<list:ITEM> {$ErrorMessage} &nbsp; </list:ITEM>
          	</FONT>
          </td>
        </tr>
     </ERRORSUMMARY>
     </core:default>

     <tr>
     	<td class="small" colspan="2">
     		<core:optional for="page_id">
     			Enter your changes to the information below to edit an existing content item.
     			When you are finished, press the Save button.
            </core:optional>
     	</td>
     </tr>

     <core:optional for="page_id">
     <tr valign="top">
       <td class="form_label" width="{$width}">
      	 <label for="date_added" runat="server">Date Posted:</label>
       </td>
       <td class="form_field">
         <span class="small"> {$date_added} </span>
       </td>
     </tr>
     <tr valign="top">
       <td class="form_label" width="{$width}">
      	 <label for="author" runat="server">Author:</label>
       </td>
       <td class="form_field">
         <span class="small"> {$author_show} </span>
       </td>
     </tr>
     <tr valign="top">
       <td class="form_label" width="{$width}">
      	 <label for="url" runat="server">URL:</label>
       </td>
       <td class="form_field">
         <span class="small">
         <!-- /{$#app_name}/pub.page.php?id={$page_id}  -->
         {$public_url}
         </span>
         <span class="small"> Use this URL to reference the static page from the left menu </span>
       </td>
     </tr>
     </core:optional>

     <core:optional for="staff_user">
     <tr valign="top">
       <td class="form_label" width="{$width}">
      	 <label for="premium" runat="server">Premium content</label>
       </td>
       <td class="form_field">
         <input name="premium" type="checkbox" id="premium" value="1" runat="server">
       </td>
     </tr>
     </core:optional>





     <tr valign="top">
       <td class="form_label" width="{$width}">
      	 <label for="type" runat="server">Type</label>
       </td>
       <td class="form_field">
         <select name='type' id='type' runat="server">
	 	 </select>
       </td>
     </tr>


     <tr valign="top">
       <td class="form_label" width="{$width}">
      	 <label for="name" runat="server">
      	 	Headline:
      	 </label>
       </td>
       <td class="form_field">
         <input name="headline" type="text" id="headline" size="64">
         <span class="small">50 characters limit </span>
       </td>
     </tr>

     <tr valign="top">
       <td class="form_label" colspan="1">
      	 <label runat="server">Text of the content:</label>
       </td>
     </tr>

     <tr valign="top">
       <td class="form_field" colspan="2">
      	 <textarea name="description" id="description" runat="server" cols="80" rows="5"> </textarea>
       </td>
     </tr>

      <tr valign="top">
       <td class="form_label" colspan="1">
      	 <label runat="server">Teaser text (Optional):</label>
       </td>
     </tr>

     <tr valign="top">
       <td class="form_field" colspan="2">
         <span class="small">
      	 Info typed in this box will appear to non subscribers when they click on a premium story. <br>
      	 If you do not enter any teaser text, your front page summary will automatically be defaulted. <br>
      	 </span>
      	 <textarea name="teaser" id="teaser" runat="server" cols="80" rows="5"> </textarea>
       </td>
     </tr>

     <core:default for="page_id">
     <tr valign="top">
       <td class="form_label" width="{$width}">
         <input name="show_menu" type="checkbox" id="show_menu" value="1" runat="server">
      	 <label for="parent_menu_id" runat="server">Add to left menu</label>
       </td>
       <td class="form_field">
         <select name="parent_menu_id" id="parent_menu_id" runat="server">
         </select>
       </td>
     </tr>
     </core:default>


     <tr>
      <td class="whiteheader_center" colspan="2">&nbsp;</td>
     </tr>

	 <tr>
      <td>&nbsp;</td>
      <td class="form_field">

      		<core:default for="page_id">
      			<input type="submit" name="create" value="Create" runat="server">
            </core:default>
            <core:optional for="page_id">
      			<input type="submit" name="save" value="Save" runat="server">
                <!--<input type="submit" name="delete" value="Delete" runat="server">-->
            </core:optional>
            <input type="submit" name="clean" value="Clean" runat="server">
            <input type="submit" name="pages" value="Back to pages" runat="server">
            <core:optional for="page_id">
                <br>
                <a href="{$public_url}" target="__blank">
                  Preview
                </a>
                <span class="small">
                	Before hitting Preview, make sure that you saved the static page information
      	 		</span>
            </core:optional>
      </td>
</tr>

</table>
</form>

<!--
<script language="Javascript">
	initEditors();
</script>
-->